package com.ruoyi.peach.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.peach.mapper.PlotMapper;
import com.ruoyi.peach.domain.Plot;
import com.ruoyi.peach.service.IPlotService;

/**
 * plotService业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-04
 */
@Service
public class PlotServiceImpl implements IPlotService 
{
    @Autowired
    private PlotMapper plotMapper;

    /**
     * 查询plot
     * 
     * @param id plot主键
     * @return plot
     */
    @Override
    public Plot selectPlotById(Long id)
    {
        return plotMapper.selectPlotById(id);
    }

    /**
     * 查询plot列表
     * 
     * @param plot plot
     * @return plot
     */
    @Override
    public List<Plot> selectPlotList(Plot plot)
    {
        return plotMapper.selectPlotList(plot);
    }

    /**
     * 新增plot
     * 
     * @param plot plot
     * @return 结果
     */
    @Override
    public int insertPlot(Plot plot)
    {
        return plotMapper.insertPlot(plot);
    }

    /**
     * 修改plot
     * 
     * @param plot plot
     * @return 结果
     */
    @Override
    public int updatePlot(Plot plot)
    {
        return plotMapper.updatePlot(plot);
    }

    /**
     * 批量删除plot
     * 
     * @param ids 需要删除的plot主键
     * @return 结果
     */
    @Override
    public int deletePlotByIds(Long[] ids)
    {
        return plotMapper.deletePlotByIds(ids);
    }

    /**
     * 删除plot信息
     * 
     * @param id plot主键
     * @return 结果
     */
    @Override
    public int deletePlotById(Long id)
    {
        return plotMapper.deletePlotById(id);
    }
}
